﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace HelpDesk.Models
{
    public class TicketPriority
    {
        private static HelpDeskDbContext _db = HelpDeskDbContext.Instance;

        public int ID { get; set; }
        public string Priority { get; set; }
        public string Color { get; set; }
        public bool IsActive { get; set; }
        public List<Ticket> Tickets { get; set;}

        public static TicketPriority GetTicketPriorityByID(int intTicketPriorityID)
        {
            var ticketPriority = _db.TicketPriorities.Find(intTicketPriorityID);
            return ticketPriority as TicketPriority;

        }

        //public static List<TicketPriority> GetTicketPriorities()
        //{
        //    var ticketPriority = _db.Tickets.Find(intTicketPriorityID);
        //    return ticketPriority as TicketPriority;

        //}
    }


}